<h4 id="msgform"></h4>
<ul class="toolbar">
	<li><a class="toolbar-save" id="save_form" href="#" >Salvar</a></li>
</ul>


<form id="pageform" method="POST" action="/news/formnews/<?php echo $this->submit;?>">
	<input type="hidden" name="cd_news" value="<?php echo $this->form->cd_news;?>" />
	<ul>
		<li><label>Título:</label><input type="input" name="title" value="<?php echo $this->form->title;?>" /></li>
		<li><label>Data:</label><input type="input" name="date" value="<?php echo $this->form->date;?>" /></li>
		<li>
			<label>Descrição:</label><br/>
			<textarea style="border: 1px solid black" name="description" cols="50" rows="20"><?php echo $this->form->description; ?></textarea>
		</li>
	</ul>
</form>

<script>
$('#pageform').submit(function() {
	$(this).ajaxSubmit({
				target: '#msgform',
				success: function(){jQuery("#formnews").trigger("reloadGrid");}
	});
	return false;
});

$('#save_form').click(function() {
	$('#pageform').submit();
});
</script>
